<%= render 'shared/error_messages' %>

<%= f.hidden_field @traceability_action, value: current_user.id %>

<table>
  <tr>
    <td id="new_document_pos"><%= f.label :name %></td>
    <td><%= f.text_field :name, :id => "doc_text_field" %></td>
  </tr>
  <tr>
    <td id="new_document_pos"><%= f.label :categories %></td>
    <td><%= select_tag("category_ids[]", 
			options_for_select(@all_categories, @selected_categories), 
			multiple: true, size: 6, :id => "categorie_settings") %>
    </td>
  </tr>
  <tr>
      <td id="new_document_pos"><%= f.label :files, :for => 'upload_file' %></td>
      <td><%= f.file_field :files, :multiple => true %></td>
  </tr>
  <tr>
    <td id="new_document_pos"><%= f.label :description %></td>
    <td><%= f.text_area :description, :id => "description_settings" %></td>
  </tr>
  <tr>
    <td id="new_document_pos"><%= f.label :authors %></td>
    <td><%= f.text_field :authors, :id => "doc_text_field" %></td>
  </tr>
  <tr>
    <td id="new_document_pos"><%= f.label :publication_date %></td>
    <td><%= f.text_field :publication_date, :id => "doc_text_field" %></td>
  </tr>
  <tr>
    <td id="new_document_pos"><%= f.label :related_work %></td>
    <td><%= f.text_field :related_work, :id => "doc_text_field" %></td>
  </tr>
  <tr>
    <td id="new_document_pos"><%= f.label :tags %></td>
    <td><%= f.text_field :tags, value: @tags, :id => "doc_text_field" %></td>
  </tr>
</table>